To synchronize the rendering of media on multiple devices connected via a wired or wireless network, the local clock (slave clock) of each device is synchronized to a common reference clock (master clock). The master clock can be the clock of one of the rendering devices. The clock synchronization process requires each slave clock to calculate an estimate of the time of the master clock and of the time drift between itself and the master clock. The slave clock then removes the estimated clock difference between itself and the master clock. Both the master clock and the slave clock provide the local time information for a respective device.
Part of the synchronization process involves each device sending a one or more data packets containing the device's local time information. From the local time information, the time it takes for a packet to reach its destination in the network can be calculated. The time difference between a master clock and a slave clock as well as the drift between the two clocks can be calculated and used to adjust the slave clock to a value that matches or substantially matches the master clock.
A problem with the described method occurs when the communication link between the devices suffers from jitter in the transmission time between a source and its destination, which introduces noise into the system. Jitter can have multiple causes. One cause can be an obstruction to a wireless link, for example a person coming between a transmitter and a receiver communicating via a wireless link. Another cause can be the Operating System operation on low cost systems (for example an embedded platform that does not have a true RTOS and does not have support for network time stamps). Many other parameters can affect the jitter in the system.
To compensate for jitter and/or any problems having a similar affect, and to calculate an accurate value of the time difference and drift between two clocks, data filtering may be employed to extract transmission delay information from the noise in the system. This process slows down the time it takes for the delay between devices to be calculated accurately and the filtering introduces an offset in the system that impacts the synchronization accuracy.
To accurately synchronize a slave clock and a master clock located on two separate devices communicating via a wired or wireless network the minimum transmission delay between the device hosting the master clock and the device hosting the slave clock, as well as the drift between the two clocks involved, should be accurately and quickly computed.